package com.yx.gateway.controller;

import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/test")
public class TestController {

    @RequestMapping(value = "/1")
    public String test(){
        return "I am client A!!!";
    }

    @RequestMapping(value = "/2")
    public String test2(@RequestHeader(value = "X-Request-Token", required = false) String token){
        return "req token:"+token;
    }
}
